package coop.bancocredicoop.proyectos.gd.alfresco;

public class WebScriptResultWithVersion {
	
	private Boolean success;
	private String message;
	private Data data;
	
	public static class Data {
		
		public Version version;
		
		public Data() {
			
		}
		
		public Version getVersion() {
			if (version == null) {
				version = new Version();
			}
			return version;
		}
		
		public static class Version {
			public String label;
			
			public Version() {
				
			}
			
			public String getLabel() {
				if (label == null) {
					label = "";
				}
				return label;
			}
			
		}

	}
	
	/**
	 * default constructor needed for GSON (JSON parser and builder)
	 */
	public WebScriptResultWithVersion() {
		
	}
	
	public WebScriptResultWithVersion(SimpleWebScriptResult simpleWebScriptResult) {
		success = simpleWebScriptResult.isSuccessful();
		message = simpleWebScriptResult.getMessage();
		data = new Data();
	}
	
	public Boolean isSuccessful() {
		return success;
	}
	
	public String getMessage() {
		return message;
	}
	
	public Data getData() {
		return data;
	}

}
